<?php

/**
 * @version		$Id: hello.php 15 2009-11-02 18:37:15Z chdemko $
 * @package		Joomla16.Tutorials
 * @subpackage	Components
 * @copyright	Copyright (C) 2005 - 2010 Open Source Matters, Inc. All rights reserved.
 * @author		Christophe Demko
 * @link		http://joomlacode.org/gf/project/helloworld_1_6/
 * @license		License GNU General Public License version 2 or later
 */

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

    $auth = new bgAuthorize();
    if($auth->getUserGroup() != 8){
        echo 'Access deny!';
        die;
    }
    $doc = JFactory::getDocument();
    // add css
    $doc->addStyleSheet( 'components/com_permission/public/css/permission.css' );
    // add js
    //$doc->addScript(''components/com_user/public/css/sample.css');
    
    
    // load BGController default
    JLoader::register('bgController', JPATH_COMPONENT.DS.'controllers'.DS.'controller.php');
    
    // get and set default controller, task
    $task = JRequest::getWord('task', 'display');
    
    $controller = new bgController();
    $controller->execute($task);
    $controller->redirect();
